Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tpetra: Implementation of CrsGraph::transferAndFillComplete #2556

Merged
merged 3 commits into from
Apr 17, 2018

Conversation

tjfulle
Copy link
Contributor

@tjfulle tjfulle commented Apr 12, 2018

CrsGraph::transferAndFillComplete is new, independent code. However, there were
some function name clashes in packCrsMatrix and packCrsGraph. So, I moved implementation
details of each to a new namespace so that they could have consistent naming. The
same goes for unpackAndCombineCrsMatrix and unpackAndCombineCrsGraph.

@trilinos/tpetra

Related Issues

How Has This Been Tested?

Tpetra tests pass with GCC 6.4, openmpi 3.0.0, openmp

Checklist

  • My commit messages mention the appropriate GitHub issue numbers.
  • My code follows the code style of the affected package(s).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the code contribution guidelines for this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • No new compiler warnings were introduced.
  • These changes break backwards compatibility.

…nds)

CrsGraph::transferAndFillComplete is new, independent code.  However, there were
some function name clashes in packCrsMatrix and packCrsGraph.  So, I moved implementation
details of each to a new namespace so that they could have consistent naming.  The
same goes for unpackAndCombineCrsMatrix and unpackAndCombineCrsGraph.

Addresses: trilinos#2267
@tjfulle
Copy link
Contributor Author

tjfulle commented Apr 12, 2018

@mhoemmen and @csiefer2 , there is a pant load of lines of code in this PR, no one in their right mind would want to go through all of them! Here is a quick summary:

  • CrsGraph::transferAndFillComplete is essentially a copy of CrsMatrix::transferAndFillComplete;
  • Details::packCrsGraph is a copy of Details::packCrsMatrix, but doesn't pack values (obviously) and the packet_type is global_ordinal_type instead of char;
  • The CrsGraph implementation of Details::unpackAndCombineIntoCrsArrays is a copy of the CrsMatrix version but doesn't unpack values (obviously) and the packet_type is global_ordinal_type instead of char.
  • I modified the CrsMatrix pack/unpack procedures to put implementation details in their own namespace so that the functions did not clash with functions of the same name in the CrsGraph pack/unpack procedures.
  • I included unfinished implementations (with guards against using them) of CrsGraph unpacking procedures. These can finished to allow unpacking in to and resizing (if necessary) a CrsGraph's local graph.

Copy link
Member

@csiefer2 csiefer2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@tjfulle tjfulle changed the title [WIP]: Tpetra: Implementation of CrsGraph::transferAndFillComplete Tpetra: Implementation of CrsGraph::transferAndFillComplete Apr 16, 2018
@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 490
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 207
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Using Repos:

Repo: TRILINOS (tjfulle/Trilinos)
  • Branch: topics/crsgraph-tafc-1
  • SHA: 4f2603a
  • Mode: TEST_REPO

Pull Request Author: tjfulle

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED

Note: Testing will normally be attempted again in approx. 4:00:00. If a change to the Pull Request source branch occurs, the testing will be attempted again.

Pull Request Auto Testing has FAILED (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 490
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 207
  • Status: FAILED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Copy link
Contributor

@mhoemmen mhoemmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is huge!!! Thanks @tjfulle ! :-D

There are a few risky includes in Tpetra_CrsGraph_def.hpp, so please be sure to test with ETI both ON and OFF. See note. Otherwise, it's a lot of code and I haven't read it all, but mainly it's all implementation details.

@@ -60,6 +60,11 @@
#include "Tpetra_Details_getEntryOnHost.hpp"
#include "Tpetra_Distributor.hpp"
#include "Teuchos_SerialDenseMatrix.hpp"
#include "Tpetra_Vector.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure to test with ETI both ON and OFF, since these includes are a bit risky. (That is, there's a risk of a circular include, since CrsMatrix depends on both CrsGraph and MultiVector, but it may only manifest in an ETI OFF build.)

using Teuchos::TimeMonitor;
#endif

using LO = LocalOrdinal;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these C++11-style using declarations! :-D

string label;
if(!params.is_null()) label = params->get("Timer Label", label);
string prefix2 = string("Tpetra ")+ label + std::string(": CrsGraph TAFC ");
RCP<TimeMonitor> MM =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For later, don't handle TimeMonitor by RCP; just treat them as the scope guards that they are. For now, this is fine.

} // domainTransfer != null


// FIXME (mfh 15 May 2014) Wouldn't communication still be needed,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think this is a valid question. "Locally replicated" implies "not distributed." The source Map could be locally replicated, even though the target Map is not. I think it's OK to leave this alone for now, though.

essentially_equal(T a, T b) {
typedef Kokkos::ArithTraits<T> KAT;
const auto eps = KAT::eps();
return KAT::abs(a - b) <= ( (KAT::abs(a) > KAT::abs(b) ? KAT::abs(b) : KAT::abs(a)) * eps);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun fact: this should also return false for a or b NaN, which is what you want :-) .

@tjfulle
Copy link
Contributor Author

tjfulle commented Apr 17, 2018

@mhoemmen looks like it failed with gcc 4.8, do you know how to check the actual failure?

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 493
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 210
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Using Repos:

Repo: TRILINOS (tjfulle/Trilinos)
  • Branch: topics/crsgraph-tafc-1
  • SHA: 4f2603a
  • Mode: TEST_REPO

Pull Request Author: tjfulle

@mhoemmen
Copy link
Contributor

@tjfulle It's on the Dashboard (yesterday's -- for some reason the clock doesn't turn over at midnight).

If you expand the "Pull Request Testing has FAILED" details arrow, you'll find the "Build Num" (207, in this case). Match that and the pull request number with the builds in the "Pull Request" section of the Dashboard.

Here is the build error: https://testing-vm.sandia.gov/cdash/viewBuildError.php?buildid=3431248

@mhoemmen
Copy link
Contributor

@tjfulle It looks like maybe you mixed up LO and GO:

/scratch/trilinos/workspace/trilinos-folder/Trilinos_pullrequest_gcc_4.8.4/Trilinos/packages/tpetra/core/src/Tpetra_Details_unpackCrsGraphAndCombine_def.hpp:812:77: note:   ‘const Kokkos::View<int*, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, Kokkos::MemoryTraits<1u> >’ is not derived from ‘const Kokkos::View<typename LocalMap::global_ordinal_type*, typename LocalMap::device_type>’

@mhoemmen
Copy link
Contributor

@tjfulle Wait a second, though -- why did this build work with GCC 4.9.3 but not with 4.8.4?

@jwillenbring @trilinos/framework Not sure what's going on here -- does the 4.9.3 build disable GO=long long?

@tjfulle
Copy link
Contributor Author

tjfulle commented Apr 17, 2018

@mhoemmen, I saw that too. I thought I was enabling GO=long long locally, but maybe not. I'll get this taken care of and pushed soon.

@mhoemmen
Copy link
Contributor

@tjfulle wrote:

I thought I was enabling GO=long long locally, but maybe not.

It should be on by default, unless you set Tpetra_INST_INT_LONG:BOOL=ON (or for some long unnecessary and now incorrect reason, set Teuchos_ENABLE_LONG_LONG_INT:BOOL=OFF).

@tjfulle
Copy link
Contributor Author

tjfulle commented Apr 17, 2018

@mhoemmen, when I tested locally, I just leave the default instantiations (but with OpenMP on).

It's not immediately jumping out at me where LO and GO may be swapped (if that is indeed the actual issue). It's late, I'll look at this again tomorrow with fresh eyes.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED

Note: Testing will normally be attempted again in approx. 4:00:00. If a change to the Pull Request source branch occurs, the testing will be attempted again.

Pull Request Auto Testing has FAILED (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 493
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 210
  • Status: FAILED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 4f2603a
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 496
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 51d0831
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 213
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 51d0831
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Using Repos:

Repo: TRILINOS (tjfulle/Trilinos)
  • Branch: topics/crsgraph-tafc-1
  • SHA: 51d0831
  • Mode: TEST_REPO

Pull Request Author: tjfulle

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED

Pull Request Auto Testing has PASSED (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 496
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 51d0831
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 213
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 2556
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH topics/crsgraph-tafc-1
TRILINOS_SOURCE_REPO https://github.com/tjfulle/Trilinos
TRILINOS_SOURCE_SHA 51d0831
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA ddd83b3

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
THE LAST COMMIT TO THIS PULL REQUEST HAS NOT BEEN REVIEWED YET!

@trilinos-autotester
Copy link
Contributor

All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur...

@tjfulle
Copy link
Contributor Author

tjfulle commented Apr 17, 2018

@mhoemmen , apparently, gcc 4.8.4 was unable to deduce the template types on the call to copyDataFromSameIDs. Explicitly putting in the type (copyDataFromSameIDs<T1,T2>) fixes the problem. Do you think it may indicative of a larger problem? (I've inspected the code many times and don't see anything jump out as incorrect)

@mhoemmen
Copy link
Contributor

@tjfulle I think that's OK. Earlier GCC versions generally are worse at deducing template parameters from function arguments. If all the template parameters are right, the GO=long long build shouldn't let you mix up types. Thanks!

@tjfulle tjfulle merged commit 47e569d into trilinos:develop Apr 17, 2018
@finkandreas
Copy link
Contributor

finkandreas commented Apr 23, 2018

Since this commit trilinos does not compile for me anymore, even a very simple test program would not compile anymore:
I use this test program:

#include <Tpetra_CrsMatrix_decl.hpp>
int main() {
  return 0;
}

Trilinos is configured with the command:
cmake -DCMAKE_BUILD_TYPE=release -DTrilinos_ENABLE_TpetraCore=ON $TRILINOS_SRC_DIR

The test program is compiled with:

export TRILINOS_SRC_DIR=/path/to/trilinos/src
export TRILINOS_BUILD_DIR=/path/to/trilinos/build
CC -I$TRILINOS_SRC_DIR/packages/tpetra/core/src -I$TRILINOS_SRC_DIR/packages/tpetra/classic/NodeAPI -I$TRILINOS_SRC_DIR/packages/tpetra/classic/src -I$TRILINOS_SRC_DIR/packages/teuchos/kokkoscompat/src -I$TRILINOS_SRC_DIR/packages/kokkos/core/src -I$TRILINOS_SRC_DIR/packages/teuchos/core/src -I$TRILINOS_SRC_DIR/packages/teuchos/parameterlist/src -I$TRILINOS_SRC_DIR/packages/teuchos/comm/src -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/sparse -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src -I$TRILINOS_SRC_DIR/packages/kokkos/containers/src -I$TRILINOS_SRC_DIR/packages/teuchos/kokkoscomm/src -I$TRILINOS_SRC_DIR/packages/teuchos/numerics/src -I$TRILINOS_SRC_DIR/packages/tpetra/core/src/kokkos_refactor -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/blas -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/blas/impl -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/impl/tpls -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/impl -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/common -I$TRILINOS_SRC_DIR/packages/kokkos/algorithms/src -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/sparse/impl -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/graph -I$TRILINOS_SRC_DIR/packages/kokkos-kernels/src/graph/impl -I$TRILINOS_BUILD_DIR/packages/tpetra/core/src -I$TRILINOS_BUILD_DIR/packages/tpetra/classic/src -I$TRILINOS_BUILD_DIR/packages/tpetra/classic/NodeAPI -I$TRILINOS_BUILD_DIR/packages/teuchos/kokkoscompat/src -I$TRILINOS_BUILD_DIR -I$TRILINOS_BUILD_DIR/packages/teuchos/core/src -I$TRILINOS_BUILD_DIR/packages/kokkos-kernels/src -I$TRILINOS_BUILD_DIR/packages/teuchos/kokkoscomm/src -c test_tpetra.cpp

My compiler version:

CC --version
g++ (GCC) 7.2.0 20170814 (Cray Inc.)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Same errors with earlier gcc versions.

The beginning of the error message:

In file included from /scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_CrsGraph_def.hpp:65:0,
                 from /scratch/snx3000/anfink/build/cpu/trilinos/build/packages/tpetra/core/src/Tpetra_CrsGraph.hpp:2,
                 from /scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_CrsMatrix_decl.hpp:57,
                 from test_tpetra.cpp:2:
/scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_Import_Util2.hpp: In function 'void Tpetra::Import_Util::sortCrsEntries(const rowptr_array_type&, const colind_array_type&)':
/scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_Import_Util2.hpp:336:30: error: wrong number of template arguments (0, should be 4)
   typedef typename CrsMatrix<>::impl_scalar_type scalar_type;
                              ^
In file included from /scratch/snx3000/anfink/build/cpu/trilinos/build/packages/tpetra/core/src/Tpetra_CrsGraph.hpp:1:0,
                 from /scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_CrsMatrix_decl.hpp:57,
                 from test_tpetra.cpp:2:
/scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_CrsGraph_decl.hpp:80:9: note: provided for 'template<class S, class LO, class GO, class N> class Tpetra::CrsMatrix'
   class CrsMatrix;
         ^~~~~~~~~
In file included from /scratch/snx3000/anfink/build/cpu/trilinos/build/packages/tpetra/core/src/Tpetra_CrsMatrix.hpp:2:0,
                 from /scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_Import_Util2.hpp:735,
                 from /scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_CrsGraph_def.hpp:65,
                 from /scratch/snx3000/anfink/build/cpu/trilinos/build/packages/tpetra/core/src/Tpetra_CrsGraph.hpp:2,
                 from /scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_CrsMatrix_decl.hpp:57,
                 from test_tpetra.cpp:2:
/scratch/snx3000/anfink/build/cpu/trilinos/src/packages/tpetra/core/src/Tpetra_CrsMatrix_def.hpp: At global scope:

Here is the full error message

@tjfulle
Copy link
Contributor Author

tjfulle commented Apr 23, 2018

@finkandreas try with the latest develop branch, this issue was resolved last week, see #2574

@finkandreas
Copy link
Contributor

Yes the develop builds correctly. I assumed that the master branch is the one, that should always compile, so I reported it.
A question considering the master branch: Is it a "safe" branch for cloning, i.e. should I expect to compile correctly and run my software correctly, or is this the develop branch? I am aware, that bugs will always be in bleeding edge checkouts, but which branch is the best choice?

@mhoemmen
Copy link
Contributor

@finkandreas Pull requests are supposed to go through pull request testing, in addition to local testing. That doesn't mean develop will build everywhere, but it should mean it generally builds and passes tests for the tested systems. Promotion to master is supposed to happen when the Dashboard is clean for a subset of all tested platforms. Again, it's a subset, not all platforms.

General best practice is to trust master more than develop, but to do application testing before accepting a new version of Trilinos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants